package com.dhcc.bpm.modules.scf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dhcc.bpm.modules.scf.dto.ScfRecyclingInInfoDTO;
import com.dhcc.bpm.modules.scf.entity.ScfRecyclingInInfo;
import com.dhcc.bpm.modules.scf.entity.ScfRenewableInInfo;
import com.dhcc.bpm.modules.scf.entity.SelectEntity.RecyclingInByPayment;
import com.dhcc.bpm.modules.scf.vo.ScfRecyclingInInfoVO.ScfGetRecyclingInDetailsVO;
import com.dhcc.bpm.modules.scf.vo.ScfRecyclingInInfoVO.ScfGetRecyclingInListVO;
import com.dhcc.bpm.modules.scf.vo.ScfRenewableInInfoVO.ScfGetRenewableInListVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 利废企业入库信息-Mapper接口
 */
@Repository
public interface ScfRecyclingInInfoMapper extends BaseMapper<ScfRecyclingInInfo> {

    /**
     * 自定义分页查询
     *
     * @param page
     * @param scfRecyclingInInfo
     * @return
     */
    List<ScfGetRecyclingInListVO> selectScfRecyclingInInfoPage(IPage<ScfGetRecyclingInListVO> page, ScfRecyclingInInfoDTO scfRecyclingInInfo);

    /**
     * 自定义查询详情
     *
     * @param scfRecyclingInInfo
     * @return
     */
    ScfGetRecyclingInDetailsVO getDetails(String rowId);

    /**
     * 通过入库单号查询入库单rowId
     *
     * @param recyclingInNum
     * @return
     */
    String selectRowIdByRecyclingInNum(String recyclingInNum);

    /**
     * 利废入库关联支付回单关系保存
     *
     * @param recyclingInByPayment
     * @return
     */
    int saveRecyclingByPayment(RecyclingInByPayment recyclingInByPayment);

    /**
     * 根据利废入库单号，删除利废入库单与支付关联关系表中，所有的该利废入库单号相关的关联关系记录
     *
     * @param recyclingInNum
     * @return
     */
    int deleteRecyclingByPayment(String recyclingInNum);

    /**
     * 查询利废入库单对应的支付回单的关系
     *
     * @param recyclingInNum
     * @return
     */
    List<RecyclingInByPayment> selectRecyclingByPayment(String recyclingInNum);


    boolean deleteByIds(String[] ids);


}
